package com.sigmatrix.h5.web.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.sigmatrix.h5.utils.SessionUtils;
/**
 * 
 *@ClassName: StorageUpLoad
 *@Description:上传入库单信息
 *@author gaomingkai
 *@date 2017年12月19日 上午10:38:16
 */
public class InStorageUpLoad implements Serializable {

	/**
	 *@Fields serialVersionUID : TODO()
	 */
	private static final long serialVersionUID = -1868193539068094484L;

	private List<QRCodeDetail> detailList;
	
	private Integer planNumTotal; //计划总箱数
	
	private Integer actualNumTotal;//实际总箱数
	
	private String orderCode;//订单号

	private Short status;//状态
	
	private String sourceWorkId;//第三方来源单号
	
	private String enterpriseCode;//企业code
	
	private String dealerCode;//收货经销商code
	

	public List<QRCodeDetail> getDetailList() {
		return detailList;
	}

	public void setDetailList(List<QRCodeDetail> detailList) {
		this.detailList = detailList;
	}


	public static InStorageUpLoad build(String dealerCode,String parentCode,String productCode,Short tag,Integer userId,String qrCode){
		InStorageUpLoad inStorageUpLoad = new InStorageUpLoad();
		List<QRCodeDetail> detailList = new ArrayList<QRCodeDetail>();
		QRCodeDetail detail = new QRCodeDetail();
		detail.setDealerCode(dealerCode);
		detail.setProductCode(productCode);
		detail.setParentCode(parentCode);
		detail.setTag(tag.intValue());
		detail.setUserId(userId);
		detail.setEnterpriseCode(SessionUtils.getEseCode());
		List<QrCode> qrCodeList = new ArrayList<QrCode>();
		QrCode code = new QrCode();
		code.setCode(qrCode);
		qrCodeList.add(code);
		detail.setQrCodeList(qrCodeList);
		detailList.add(detail);
		inStorageUpLoad.setDetailList(detailList);
		return inStorageUpLoad;
	}
	public Integer getPlanNumTotal() {
		return planNumTotal;
	}

	public void setPlanNumTotal(Integer planNumTotal) {
		this.planNumTotal = planNumTotal;
	}

	public Integer getActualNumTotal() {
		return actualNumTotal;
	}

	public void setActualNumTotal(Integer actualNumTotal) {
		this.actualNumTotal = actualNumTotal;
	}

	public String getOrderCode() {
		return orderCode;
	}

	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}

	public Short getStatus() {
		return status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}

	public String getSourceWorkId() {
		return sourceWorkId;
	}

	public void setSourceWorkId(String sourceWorkId) {
		this.sourceWorkId = sourceWorkId;
	}

	public String getEnterpriseCode() {
		return enterpriseCode;
	}

	public void setEnterpriseCode(String enterpriseCode) {
		this.enterpriseCode = enterpriseCode;
	}

	public String getDealerCode() {
		return dealerCode;
	}

	public void setDealerCode(String dealerCode) {
		this.dealerCode = dealerCode;
	}
	
	
}
